package cn.tsingyu.spring.example.service;

import java.util.Set;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.tsingyu.spring.example.dao.UserDao;
import cn.tsingyu.spring.example.entity.User;

@Service
public class UserService {
	@Autowired
	private UserDao userDao;
	
	public User getUser(final String username,String password){
		return userDao.getUser(username, password);
	}
	
	public User getByUserName(String userName) {
		return userDao.getByUserName(userName);
	}
	
	public Set<String> getRoles(String userName) {
		return userDao.getRoles(userName);
	}

	public Set<String> getPermissions(String userName) {
		return userDao.getPermissions(userName);
	}
}
